#include "WordErrorRate.h"


namespace Utilities {
	namespace Evaluation {

		double WordErrorRate::evaluer(ResultArray & _result){	
			ResultArray::Iterator ite;
			double res = 0;

			for(ite=_result.begin(); ite!=_result.end(); ++ite){
				if ( ite->getFeatures()->getTag() != ite->getPredictedTag() ){
					res++;
				}
			}
			return res/(double)_result.size();
		}
	}
}